package com.example.springmvcinterview.circularDependency;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author : 叶荻风
 * @create : 2024/12/23 17:02
 */
@Component
public class B {
    private  A a;
//    @Autowired
//    public void setA(A a) {
//        System.out.println("class B里填充Class A");
//        this.a = a;
//    }

    public B(A a) {
        System.out.println("B中塞入A");
        this.a = a;
    }
}